using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace DemoVS2022.API.Controllers
{
    [ApiController]
    [Route("api/[controller]/[action]")]
    public class AnotherRouteController : ControllerBase
    {
        [HttpGet]
        // 自定义路由-----方法1
        [Route("A/B/C")]
        public string Get()
        {
            return "ABC";
        }

        [HttpGet("AA/BB/CC")]
        // 自定义路由-----方法2
        public string Get(int id)
        {
            return "A" + id + "C";
        }
    }
}